package com.gcit.seniorWish.web.core.util;

import com.gcit.seniorWish.core.util.SpringContextHolder;
import com.gcit.seniorWish.web.config.properties.GunsProperties;

/**
 * 验证码工具类
 */
public class KaptchaUtil {

    /**
     * 获取验证码开关
     *
     * @author stylefeng
     * @Date 2017/5/23 22:34
     */
    public static Boolean getKaptchaOnOff() {
        return SpringContextHolder.getBean(GunsProperties.class).getKaptchaOpen();
    }

    /**
     * 获取前端验证码开关
     * @return
     */
    public static Boolean getPortalKaptchaOnOff() {
        return SpringContextHolder.getBean(GunsProperties.class).getKaptchaPortalOpen();
    }


    /**
     * 获取查分页面验证码开关
     * @return
     */
    public static Boolean getScoreKaptchaOnOff() {
        return SpringContextHolder.getBean(GunsProperties.class).getKaptchaScoreOpen();
    }
}